package erp.education.web.action.finance.master;

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ModelDriven;

import erp.education.client.finance.master.FeeHeadRequest;
import erp.education.server.beans.interfaces.finance.master.FeeHeadServiceI;
import erp.education.web.common.BaseAction;

public class FeeHeadsAction extends BaseAction implements
		ModelDriven<FeeHeadRequest> {
	@Autowired
	FeeHeadRequest feeHeadRequest;
	@Autowired
	FeeHeadServiceI feeHeadService;

	public String feeHeads() throws Exception {

		this.result = feeHeadService.feeHeadLoadSevice(feeHeadRequest)
				.getResponseObject();
		getRequest().setAttribute("result", this.result.getResultList());

		return "feeheads";
	}

	public String saveUpdateFeeHeadDetails() throws Exception {
		this.result = feeHeadService.saveUpdateFeeHeadDetails(feeHeadRequest)
				.getResponseObject();
		getRequest().setAttribute("result", this.result.getResultList());

		return "feeheads";
	}

	@Override
	public FeeHeadRequest getModel() {
		return this.feeHeadRequest;
	}
}
